<!--
  ~  BicBucStriim
  ~
  ~  Copyright (c) 2012-2015 Rainer Volz
  ~  Licensed under MIT License, see LICENSE
  ~
  -->

<div data-role="navbar">
    <ul>
        <li>
            <a href="{{page.rot}}/" data-icon="home" data-rel="external" {% if page.menu== 1 %}class="ui-btn-active"
               {%endif%}>
                {{page.glob.l10n.home}}
            </a>
        </li>
        <li>
            <a href="{{page.rot}}/titleslist/0/" data-icon="bars" {% if page.menu== 2 %}class="ui-btn-active" {%endif%}>
                {{page.glob.l10n.titles}}
            </a>
        </li>
        <li>
            <a href="{{page.rot}}/authorslist/0/" data-icon="user" {% if page.menu== 3 %}class="ui-btn-active"
               {%endif%}>
                {{page.glob.l10n.authors}}
            </a>
        </li>
        <li>
            <a href="{{page.rot}}/tagslist/0/" data-icon="tag" {% if page.menu== 4 %}class="ui-btn-active" {%endif%}>
                {{page.glob.l10n.tags}}
            </a>
        </li>
        <li>
            <a href="{{page.rot}}/serieslist/0/" data-icon="bullets" {% if page.menu== 5 %}class="ui-btn-active"
               {%endif%}>
                {{page.glob.l10n.series}}
            </a>
        </li>
    </ul>
</div>
{% if page.menu != 1 %}
<div data-role="navbar" data-iconpos="left" class="ui-body ui-body-c">
    <ul>
{% if curpage != NULL %}
        <li>
	{% if curpage > 0 %}
            <a data-icon="arrow-l"
               href="{{page.rot}}/{{url}}/{{curpage - 1}}/{% if search != NULL %}?search={{search}}{% endif %}{% if sort != NULL %}?sort={{sort}}{% endif %}">
                {{page.glob.l10n.pagination_prev}}
            </a>
            {% else %}
            <a href="#" data-icon="blank" class="ui-nodisc-icon ui-alt-icon">&nbsp;</a>
	{% endif %}
        </li>
        <li>
            <a
                    {% if search !=NULL %}
                    href="#" data-icon="search"
                    {% elseif sort== "byReverseDate" %}
            href="{{page.rot}}/titleslist/0/?sort=byTitle" data-icon="calendar"
            {% else %}
            href="{{page.rot}}/titleslist/0/?sort=byReverseDate" data-icon="comment"
            {% endif %}
            >
            {% if search != NULL %}
            {{page.glob.l10n.pagination_search}}
            {% else %}
            {{page.glob.l10n.pagination_page}}
            {% endif %}
            {% if pages > 0 %}{{ curpage+1 }}/{{ pages }}{% else %}0/0{% endif %}
            </a>
        </li>
        <li>
	{% if curpage+1 < pages %}
            <a data-icon="arrow-r"
               href="{{page.rot}}/{{url}}/{{curpage + 1}}/{% if search != NULL %}?search={{search}}{% endif %}{% if sort != NULL %}?sort={{sort}}{% endif %}">
			{{page.glob.l10n.pagination_next}}
            </a>
            {% else %}
            <a href="#" data-icon="blank" class="ui-nodisc-icon  ui-alt-icon">&nbsp;</a>
	{% endif %}
        </li>
{% else %}
        <li><a href="#" data-icon="blank" class="ui-nodisc-icon  ui-alt-icon">&nbsp;</a></li>
        <li><a href="#" data-icon="blank" class="ui-nodisc-icon  ui-alt-icon">&nbsp;</a></li>
        <li>
	{% if page.auth %}
            {% if page.level > 1 %}
            <a data-rel="back" data-icon="back">
                {{ page.glob.l10n.back }}
            </a>
            {% else %}
            <a href="#" data-icon="blank" class="ui-nodisc-icon ui-alt-icon">&nbsp;</a>
            {% endif %}
	{% endif %}
        </li>
{% endif %}
    </ul>
</div>
{% endif %}


